<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>WordPress | 阿里云轻量应用服务器wordpress升级php步骤 | Justlovesmile's BLOG</title><meta name="keywords" content="linux,阿里云,wordpress,php"><meta name="author" content="Justlovesmile,865717150@qq.com"><meta name="copyright" content="Justlovesmile"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="当我买了阿里云轻量应用服务器wordpress镜像后，发现很多主题需要升级php…">
<meta property="og:type" content="article">
<meta property="og:title" content="WordPress | 阿里云轻量应用服务器wordpress升级php步骤">
<meta property="og:url" content="https://blog.justlovesmile.top/posts/10224.html">
<meta property="og:site_name" content="Justlovesmile&#39;s BLOG">
<meta property="og:description" content="当我买了阿里云轻量应用服务器wordpress镜像后，发现很多主题需要升级php…">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/000846-15763397267e73.jpg">
<meta property="article:published_time" content="2020-02-24T02:43:08.000Z">
<meta property="article:modified_time" content="2020-02-24T02:43:08.000Z">
<meta property="article:author" content="Justlovesmile">
<meta property="article:tag" content="linux">
<meta property="article:tag" content="阿里云">
<meta property="article:tag" content="wordpress">
<meta property="article:tag" content="php">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/000846-15763397267e73.jpg"><link rel="shortcut icon" href="/img/logo.jpg"><link rel="canonical" href="https://blog.justlovesmile.top/posts/10224"><link rel="preconnect" href="//cdn.jsdelivr.net"><link rel="preconnect" href="//hm.baidu.com"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?a2ee893562999ebad688b0d82daa100a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/font/family=Titillium+Web.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":400},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":100,"languages":{"author":"作者: Justlovesmile","link":"链接: ","source":"来源: Justlovesmile's BLOG","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"var(--mj-card-bg)","bgDark":"var(--mj-card-bg)","position":"top-right"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'WordPress | 阿里云轻量应用服务器wordpress升级php步骤',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2020-02-24 10:43:08'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const now = new Date()
          const hour = now.getHours()
          const isNight = hour <= 6 || hour >= 18
          if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
          else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome-animation@0.2.1/dist/font-awesome-animation.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css"><link rel="stylesheet" href="/css/justlovesmile.css"><link rel="stylesheet" href="/css/blogicon.css"><meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/atom.xml" title="Justlovesmile's BLOG" type="application/atom+xml">
</head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">75</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">69</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div></div><hr><div class="menus_items"><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 网站</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></li><li><a class="site-page child" href="/guestbook/"><i class="fa-fw fas fa-pencil-alt"></i><span> 留言</span></a></li><li><a class="site-page child" href="/friends/"><i class="fa-fw fas fa-paper-plane"></i><span> 友链</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 文库</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 全部标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 全部分类</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-calendar"></i><span> 文章列表</span></a></li><li><a class="site-page child" href="/random/"><i class="fa-fw fas fa-shoe-prints"></i><span> 随便逛逛</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 实验室</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/laboratory/"><i class="fa-fw fa fa-lightbulb-o"></i><span> 项目展示</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fa fa-puzzle-piece"></i><span> 友链订阅</span></a></li><li><a class="site-page child" href="/charts/"><i class="fa-fw fa fa-pie-chart"></i><span> 博客统计</span></a></li><li><a class="site-page child" href="/update/"><i class="fa-fw fa fa-commenting-o"></i><span> 更新日志</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/photos/"><i class="fa-fw fas fa-camera-retro"></i><span> 相册</span></a></li><li><a class="site-page child" href="/video/"><i class="fa-fw fa fa-video-camera"></i><span> 视频</span></a></li><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 歌单</span></a></li><li><a class="site-page child" href="/focus/"><i class="fa-fw fa fa-check-square-o"></i><span> 关注</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 关于</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/about/"><i class="fa-fw fas fa-user"></i><span> 本站</span></a></li><li><a class="site-page child" href="/love/"><i class="fa-fw fa fa-heart"></i><span> Love</span></a></li><li><a class="site-page child" href="/donate/"><i class="fa-fw fa fa-gratipay"></i><span> 打赏</span></a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/000846-15763397267e73.jpg')"><nav id="nav"><div id="nav-group"><div id="blog_name"><a id="site-name" href="/">Justlovesmile</a></div><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 网站</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></li><li><a class="site-page child" href="/guestbook/"><i class="fa-fw fas fa-pencil-alt"></i><span> 留言</span></a></li><li><a class="site-page child" href="/friends/"><i class="fa-fw fas fa-paper-plane"></i><span> 友链</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 文库</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 全部标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 全部分类</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-calendar"></i><span> 文章列表</span></a></li><li><a class="site-page child" href="/random/"><i class="fa-fw fas fa-shoe-prints"></i><span> 随便逛逛</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 实验室</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/laboratory/"><i class="fa-fw fa fa-lightbulb-o"></i><span> 项目展示</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fa fa-puzzle-piece"></i><span> 友链订阅</span></a></li><li><a class="site-page child" href="/charts/"><i class="fa-fw fa fa-pie-chart"></i><span> 博客统计</span></a></li><li><a class="site-page child" href="/update/"><i class="fa-fw fa fa-commenting-o"></i><span> 更新日志</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/photos/"><i class="fa-fw fas fa-camera-retro"></i><span> 相册</span></a></li><li><a class="site-page child" href="/video/"><i class="fa-fw fa fa-video-camera"></i><span> 视频</span></a></li><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 歌单</span></a></li><li><a class="site-page child" href="/focus/"><i class="fa-fw fa fa-check-square-o"></i><span> 关注</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><span> 关于</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/about/"><i class="fa-fw fas fa-user"></i><span> 本站</span></a></li><li><a class="site-page child" href="/love/"><i class="fa-fw fa fa-heart"></i><span> Love</span></a></li><li><a class="site-page child" href="/donate/"><i class="fa-fw fa fa-gratipay"></i><span> 打赏</span></a></li></ul></div></div></div><div id="nav-right"><div id="search-button"><a class="nav-rightbutton site-page social-icon search"><i class="fas fa-search fa-fw"></i></a></div><div id="darkmode_navswitch"><a class="nav-rightbutton site-page darkmode_switchbutton" onclick="switchDarkMode()"><i class="fas fa-adjust"></i></a></div><div id="toggle-menu"><a class="nav-rightbutton site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></div></nav><div class="coverdiv" id="coverdiv"><img class="cover entered loading" id="post-cover" alt="cover" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/000846-15763397267e73.jpg"></div><div id="post-info"><div class="post-firstinfo" id="post-meta"><span class="post-meta-categories"><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E6%8A%98%E8%85%BE%E8%AE%B0%E5%BD%95/">折腾记录</a></span><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/linux/">#linux</a><a class="post-meta__tags" href="/tags/%E9%98%BF%E9%87%8C%E4%BA%91/">#阿里云</a><a class="post-meta__tags" href="/tags/wordpress/">#wordpress</a><a class="post-meta__tags" href="/tags/php/">#php</a></div></div><h1 class="post-title">WordPress | 阿里云轻量应用服务器wordpress升级php步骤</h1><div id="post-meta"><div class="meta-firstline"><span class="meta-share-time"><span class="meta-avatar"><a class="meta-avatar-img" href="/about/" title="关于作者"><img alt="作者头像" src= "" data-lazy-src="/img/avatar.jpg"></a><a class="meta-avatar-name" href="/about/" title="关于作者">Justlovesmile</a></span></span><span class="post-meta-date"><i class="fa-fw post-meta-icon far fa-calendar-alt"></i><span class="post-meta-label">发表于</span><time datetime="2020-02-24T02:43:08.000Z" title="发表于 2020-02-24 10:43:08">2020-02-24</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">803</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>3分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>当我买了阿里云轻量应用服务器wordpress镜像后，发现很多主题需要升级php…</p>
<span id="more"></span>


<h2 id="1-首先更新依赖包。"><a href="#1-首先更新依赖包。" class="headerlink" title="1.首先更新依赖包。"></a>1.首先更新依赖包。</h2><figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">yum -y update</span></span><br></pre></td></tr></table></figure>

<h2 id="2-安装依赖包"><a href="#2-安装依赖包" class="headerlink" title="2.安装依赖包"></a>2.安装依赖包</h2><figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">yum</span> -y install libxml<span class="number">2</span> libxml<span class="number">2</span>-devel openssl openssl-devel bzip<span class="number">2</span> bzip<span class="number">2</span>-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel zlib zlib-devel glibc glibc-devel glib<span class="number">2</span> glib<span class="number">2</span>-devel ncurses curl gdbm-devel db<span class="number">4</span>-devel libXpm-devel libX<span class="number">11</span>-devel gd-devel gmp-devel expat-devel xmlrpc-c xmlrpc-c-devel libicu-devel libmcrypt-devel libmemcached-devel libzip gcc-c++</span><br></pre></td></tr></table></figure>

<h2 id="3-转到-usr-local-src-目录，下载php7-3-5"><a href="#3-转到-usr-local-src-目录，下载php7-3-5" class="headerlink" title="3.转到 /usr/local/src 目录，下载php7.3.5"></a>3.转到 /usr/local/src 目录，下载php7.3.5</h2><p><code>cd /usr/local/src</code><br><code>wget https://www.php.net/distributions/php-7.3.5.tar.gz</code></p>
<h2 id="4-解压安装包-并进入目录"><a href="#4-解压安装包-并进入目录" class="headerlink" title="4.解压安装包,并进入目录"></a>4.解压安装包,并进入目录</h2><figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">tar</span> -zxvf php-<span class="number">7</span>.<span class="number">3</span>.<span class="number">5</span>.tar.gz</span><br><span class="line"><span class="attribute">cd</span> php-<span class="number">7</span>.<span class="number">3</span>.<span class="number">5</span></span><br></pre></td></tr></table></figure>

<h2 id="5-添加用户和组"><a href="#5-添加用户和组" class="headerlink" title="5.添加用户和组"></a>5.添加用户和组</h2><figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">groupadd www</span></span><br><span class="line"><span class="attribute">useradd -g www www</span></span><br></pre></td></tr></table></figure>

<h2 id="6-开始编译"><a href="#6-开始编译" class="headerlink" title="6.开始编译"></a>6.开始编译</h2><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">./configure</span> <span class="params">--prefix=/usr/local/php</span> <span class="params">--with-fpm-user=www</span> <span class="params">--with-fpm-group=www</span> <span class="params">--with-curl</span> <span class="params">--with-freetype-dir</span> <span class="params">--with-gd</span> <span class="params">--with-gettext</span> <span class="params">--with-iconv-dir</span> <span class="params">--with-kerberos</span> <span class="params">--with-libdir=lib64</span> <span class="params">--with-libxml-dir</span> <span class="params">--with-mysqli</span> <span class="params">--with-openssl</span> <span class="params">--with-pcre-regex</span> <span class="params">--with-pdo-mysql</span> <span class="params">--with-pdo-sqlite</span> <span class="params">--with-pear</span> <span class="params">--with-png-dir</span> <span class="params">--with-jpeg-dir</span> <span class="params">--with-xmlrpc</span> <span class="params">--with-xsl</span> <span class="params">--with-zlib</span> <span class="params">--with-bz2</span> <span class="params">--with-mhash</span> <span class="params">--enable-fpm</span> <span class="params">--enable-bcmath</span> <span class="params">--enable-libxml</span> <span class="params">--enable-inline-optimization</span> <span class="params">--enable-mbregex</span> <span class="params">--enable-mbstring</span> <span class="params">--enable-opcache</span> <span class="params">--enable-pcntl</span> <span class="params">--enable-shmop</span> <span class="params">--enable-soap</span> <span class="params">--enable-sockets</span> <span class="params">--enable-sysvsem</span> <span class="params">--enable-sysvshm</span> <span class="params">--enable-xml</span> <span class="params">--enable-zip</span> <span class="params">--enable-fpm</span></span><br></pre></td></tr></table></figure>

<p>这里会提示 <code>configure: error: Please reinstall the libzip distribution</code>，我们需要移除libzip,手动安装最新版本</p>
<h2 id="7-安装libzip"><a href="#7-安装libzip" class="headerlink" title="7.安装libzip"></a>7.安装libzip</h2><p>（1）先安装cmake</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">cd <span class="regexp">/usr/</span>local/src</span><br><span class="line">wget https:<span class="regexp">//gi</span>thub.com<span class="regexp">/Kitware/</span>CMake<span class="regexp">/releases/</span>download<span class="regexp">/v3.14.3/</span>cmake-<span class="number">3.14</span>.<span class="number">3</span>.tar.gz</span><br><span class="line">tar -zxvf cmake-<span class="number">3.14</span>.<span class="number">3</span>.tar.gz</span><br><span class="line">cd cmake-<span class="number">3.14</span>.<span class="number">3</span></span><br><span class="line">./bootstrap</span><br><span class="line">make &amp;&amp; make install</span><br></pre></td></tr></table></figure>

<p>（2）再编译安装libzip</p>
<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">yum</span> remove libzip -y</span><br><span class="line"><span class="attribute">cd</span> /usr/local/src</span><br><span class="line"><span class="attribute">wget</span> https://libzip.org/download/libzip-<span class="number">1</span>.<span class="number">5</span>.<span class="number">2</span>.tar.gz</span><br><span class="line"><span class="attribute">tar</span> -zxvf libzip-<span class="number">1</span>.<span class="number">5</span>.<span class="number">2</span>.tar.gz</span><br><span class="line"><span class="attribute">cd</span> libzip-<span class="number">1</span>.<span class="number">5</span>.<span class="number">2</span></span><br><span class="line"><span class="attribute">mkdir</span> build</span><br><span class="line"><span class="attribute">cd</span> build</span><br><span class="line"><span class="attribute">cmake</span> ..</span><br><span class="line"><span class="attribute">make</span> &amp;&amp; make install</span><br></pre></td></tr></table></figure>

<p>（3）执行以下命令</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">vi <span class="regexp">/etc/</span>ld.so.conf</span><br><span class="line"><span class="comment">#添加如下几行</span></span><br><span class="line"><span class="regexp">/usr/</span>local/lib64</span><br><span class="line"><span class="regexp">/usr/</span>local/lib</span><br><span class="line"><span class="regexp">/usr/</span>lib</span><br><span class="line"><span class="regexp">/usr/</span>lib64</span><br><span class="line"><span class="comment">#保存退出</span></span><br><span class="line">ldconfig -v </span><br><span class="line"><span class="comment"># 使之生效 </span></span><br></pre></td></tr></table></figure>

<h2 id="8-再次编译PHP7-3"><a href="#8-再次编译PHP7-3" class="headerlink" title="8.再次编译PHP7.3"></a>8.再次编译PHP7.3</h2><p><code>make &amp;&amp; make install</code></p>
<h2 id="9-编译完成后，添加环境变量"><a href="#9-编译完成后，添加环境变量" class="headerlink" title="9.编译完成后，添加环境变量"></a>9.编译完成后，添加环境变量</h2><figure class="highlight elixir"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">vi /etc/profile</span><br><span class="line"><span class="comment">#添加以下内容到最后</span></span><br><span class="line">PATH=<span class="variable">$PATH</span><span class="symbol">:/usr/local/php/bin&lt;br&gt;export</span> PATH</span><br><span class="line"><span class="comment">#刷新环境变量</span></span><br><span class="line">source /etc/profile</span><br></pre></td></tr></table></figure>

<h2 id="10-配置文件"><a href="#10-配置文件" class="headerlink" title="10.配置文件"></a>10.配置文件</h2><figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 将启动脚本复制到init.d中。</span></span><br><span class="line">cp <span class="regexp">/usr/</span>local<span class="regexp">/src/</span>php-<span class="number">7.3</span>.<span class="number">5</span><span class="regexp">/sapi/</span>fpm<span class="regexp">/init.d.php-fpm /</span>etc<span class="regexp">/init.d/</span>php-fpm73</span><br><span class="line"><span class="comment"># 给启动脚本加上执行权限</span></span><br><span class="line">chmod +x <span class="regexp">/etc/i</span>nit.d/php-fpm73</span><br><span class="line"><span class="comment"># 将默认配置文件复制为.conf文件</span></span><br><span class="line">cp <span class="regexp">/usr/</span>local<span class="regexp">/php/</span>etc<span class="regexp">/php-fpm.conf.default $&#123;PHP73_DIR&#125;/</span>etc/php-fpm.conf</span><br><span class="line"><span class="comment"># 添加pool的配置</span></span><br><span class="line">cat &lt;&lt; EOF &gt; <span class="regexp">/usr/</span>local<span class="regexp">/php/</span>etc<span class="regexp">/php-fpm.d/</span>www.conf</span><br><span class="line">[www]</span><br><span class="line">listen = <span class="regexp">/home/</span>www<span class="regexp">/logs/</span>php73-fpm.sock</span><br><span class="line">listen.mode = <span class="number">0666</span></span><br><span class="line">user = www</span><br><span class="line">group = www</span><br><span class="line">pm = dynamic</span><br><span class="line">pm.max_children = <span class="number">128</span></span><br><span class="line">pm.start_servers = <span class="number">5</span></span><br><span class="line">pm.min_spare_servers = <span class="number">5</span></span><br><span class="line">pm.max_spare_servers = <span class="number">15</span></span><br><span class="line">pm.max_requests = <span class="number">300</span></span><br><span class="line">rlimit_files = <span class="number">1024</span></span><br><span class="line">slowlog = <span class="regexp">/home/</span>www<span class="regexp">/logs/</span>php73-fpm-slow.log</span><br><span class="line">EOF</span><br></pre></td></tr></table></figure>

<h2 id="11-修改apache"><a href="#11-修改apache" class="headerlink" title="11.修改apache"></a>11.修改apache</h2><p>镜像中默认是用的php-fpm，使用的是socket方式的监听，Apache对应配置文件<code>/usr/local/apache/conf/httpd.conf</code>，其中配置如下:</p>
<p><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/20210304220934.png"></p>
<p>需要修改其中socket的文件路径指向到新版本的PHP就可以了，在<code>/usr/local/php73/etc/php-fpm.d/www.conf</code>有指定，新的配置到<code>/home/www/logs/php73-fpm.sock</code>即可，如图:</p>
<p><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/20210304221206.png"></p>
<h2 id="12-重启服务"><a href="#12-重启服务" class="headerlink" title="12.重启服务"></a>12.重启服务</h2><figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 停止旧版本的PHP(实际不停止也不影响，停止可以减少一些系统资源占用)</span></span><br><span class="line"><span class="regexp">/etc/i</span>nit.d/php-fpm stop</span><br><span class="line"><span class="comment"># 启动新版PHP-FPM</span></span><br><span class="line"><span class="regexp">/etc/i</span>nit.d/php-fpm73 start</span><br><span class="line"><span class="comment">#启动报错请修改文件名</span></span><br><span class="line">修改<span class="regexp">/usr/</span>local<span class="regexp">/php/</span>etc/php-fpm.conf.default为php-fpm.conf</span><br><span class="line"><span class="comment"># 重启apache</span></span><br><span class="line"><span class="regexp">/etc/i</span>nit.d/apachectl restart</span><br></pre></td></tr></table></figure></article><div class="post-reward"><div class="reward-button"><i class="fas fa-hamburger"></i> 打赏作者</div><div class="reward-main"><ul class="reward-all"><ul class="reward-group"><li class="reward-item"><a href="/img/wechat.jpg" target="_blank"><img class="post-qr-code-img" src= "" data-lazy-src="/img/wechat.jpg" alt="微信"></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="/img/alipay.jpg" target="_blank"><img class="post-qr-code-img" src= "" data-lazy-src="/img/alipay.jpg" alt="支付宝"></a><div class="post-qr-code-desc">支付宝</div></li></ul><a class="reward-main-btn" href="/donate"><div class="reward-text">赞赏者名单</div><div class="reward-dec">因为你们的支持让我意识到写文章的价值🙏</div></a></ul></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/linux/">linux</a><a class="post-meta__tags" href="/tags/%E9%98%BF%E9%87%8C%E4%BA%91/">阿里云</a><a class="post-meta__tags" href="/tags/wordpress/">wordpress</a><a class="post-meta__tags" href="/tags/php/">php</a></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/000846-15763397267e73.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-info">WordPress | 阿里云轻量应用服务器wordpress升级php步骤</span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://blog.justlovesmile.top/posts/10224.html">https://blog.justlovesmile.top/posts/10224.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="external nofollow noopener noreferrer">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://blog.justlovesmile.top" target="_blank">Justlovesmile's BLOG</a>！</span></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/62966.html"><img class="prev-cover" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/7f907f6c-ba49-78e4-24e4-b3594dc3a1f2.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">iOS快捷指令 | 早安，让Siri唤醒你的美好一天</div></div></a></div><div class="next-post pull-right"><a href="/posts/60270.html"><img class="next-cover" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/1584110986-u29974937523374358523fm26gp0.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Github | 解决github头像加载不出来</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/posts/39201.html" title="Python指南 | 在linux上安装python3.7"><img class="cover" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/1584111974-u41116003233235941168fm26gp0.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2019-10-11</div><div class="title">Python指南 | 在linux上安装python3.7</div></div></a></div><div><a href="/posts/355a5fb2.html" title="MySQL | 阿里云轻量应用服务器如何配置mysql"><img class="cover" src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/image/103831-15708479117885.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-04-13</div><div class="title">MySQL | 阿里云轻量应用服务器如何配置mysql</div></div></a></div></div></div><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "" data-lazy-src="/img/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"></div><div class="author-info__name">Justlovesmile</div><div class="author-info__description">一个计算机专业学生的个人博客，记录着学习笔记和生活中的思考，期待着和所有人相遇</div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">75</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">69</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div></div><!--if(theme.social)--><!--    .card-info-social-icons.is-center--><!--      !=fragment_cache('social', function(){return partial('includes/header/social')}) --></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content"><p>不定时更新博客，欢迎交换<a href="/friends/"><strong>友链</strong></a>...</p><div class="twopeople"><div class="container" style="height:200px;"><canvas class="illo" width="800" height="800" style="max-width:200px;max-height:200px;touch-action:none;width:640px;height:640px;"></canvas></div><script src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/js/twopeople1.js"></script><script src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/js/zdog.dist.js"></script><script id="rendered-js" src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN/js/twopeople.js"></script><style>.twopeople{margin:0;align-items:center;justify-content:center;text-align:center;}canvas{display:block;margin:0 auto;cursor:move;}</style></div><div style="text-align:center;"><a href="https://www.foreverblog.cn/" target="_blank" rel="external nofollow noopener noreferrer"> <img src= "" data-lazy-src="https://img.foreverblog.cn/logo_en_default.png" alt="foreverblog" style="width:auto;height:16px;"></a></div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-%E9%A6%96%E5%85%88%E6%9B%B4%E6%96%B0%E4%BE%9D%E8%B5%96%E5%8C%85%E3%80%82"><span class="toc-text">1.首先更新依赖包。</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E5%AE%89%E8%A3%85%E4%BE%9D%E8%B5%96%E5%8C%85"><span class="toc-text">2.安装依赖包</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-%E8%BD%AC%E5%88%B0-usr-local-src-%E7%9B%AE%E5%BD%95%EF%BC%8C%E4%B8%8B%E8%BD%BDphp7-3-5"><span class="toc-text">3.转到 &#x2F;usr&#x2F;local&#x2F;src 目录，下载php7.3.5</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-%E8%A7%A3%E5%8E%8B%E5%AE%89%E8%A3%85%E5%8C%85-%E5%B9%B6%E8%BF%9B%E5%85%A5%E7%9B%AE%E5%BD%95"><span class="toc-text">4.解压安装包,并进入目录</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-%E6%B7%BB%E5%8A%A0%E7%94%A8%E6%88%B7%E5%92%8C%E7%BB%84"><span class="toc-text">5.添加用户和组</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-%E5%BC%80%E5%A7%8B%E7%BC%96%E8%AF%91"><span class="toc-text">6.开始编译</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#7-%E5%AE%89%E8%A3%85libzip"><span class="toc-text">7.安装libzip</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#8-%E5%86%8D%E6%AC%A1%E7%BC%96%E8%AF%91PHP7-3"><span class="toc-text">8.再次编译PHP7.3</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#9-%E7%BC%96%E8%AF%91%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E6%B7%BB%E5%8A%A0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F"><span class="toc-text">9.编译完成后，添加环境变量</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#10-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="toc-text">10.配置文件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#11-%E4%BF%AE%E6%94%B9apache"><span class="toc-text">11.修改apache</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#12-%E9%87%8D%E5%90%AF%E6%9C%8D%E5%8A%A1"><span class="toc-text">12.重启服务</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/56b0563d.html" title="Hexo博客 | 如何让Butterfly主题导航栏居中"><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/20220315095300.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hexo博客 | 如何让Butterfly主题导航栏居中"></a><div class="content"><a class="title" href="/posts/56b0563d.html" title="Hexo博客 | 如何让Butterfly主题导航栏居中">Hexo博客 | 如何让Butterfly主题导航栏居中</a><time datetime="2022-03-15T01:25:18.000Z" title="发表于 2022-03-15 09:25:18">2022-03-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/bb608df3.html" title="目标检测 | RetinaNet，经典单阶段Anchor-Based目标检测模型"><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/20220314113659.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="目标检测 | RetinaNet，经典单阶段Anchor-Based目标检测模型"></a><div class="content"><a class="title" href="/posts/bb608df3.html" title="目标检测 | RetinaNet，经典单阶段Anchor-Based目标检测模型">目标检测 | RetinaNet，经典单阶段Anchor-Based目标检测模型</a><time datetime="2022-03-14T03:26:21.000Z" title="发表于 2022-03-14 11:26:21">2022-03-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/fc798de3.html" title="目标检测 | Faster R-CNN，经典两阶段检测模型"><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/20220312220823.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="目标检测 | Faster R-CNN，经典两阶段检测模型"></a><div class="content"><a class="title" href="/posts/fc798de3.html" title="目标检测 | Faster R-CNN，经典两阶段检测模型">目标检测 | Faster R-CNN，经典两阶段检测模型</a><time datetime="2022-03-12T13:59:01.000Z" title="发表于 2022-03-12 21:59:01">2022-03-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/d150f284.html" title="深度学习 | 小样本学习基础概念"><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/202201271037441.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="深度学习 | 小样本学习基础概念"></a><div class="content"><a class="title" href="/posts/d150f284.html" title="深度学习 | 小样本学习基础概念">深度学习 | 小样本学习基础概念</a><time datetime="2022-01-27T02:24:38.000Z" title="发表于 2022-01-27 10:24:38">2022-01-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/e05a9ab6.html" title="Jupyter Lab | 安装、配置、插件推荐、多用户使用教程"><img src= "" data-lazy-src="https://cdn.jsdelivr.net/gh/Justlovesmile/CDN2/post/image-20211125175041150.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Jupyter Lab | 安装、配置、插件推荐、多用户使用教程"></a><div class="content"><a class="title" href="/posts/e05a9ab6.html" title="Jupyter Lab | 安装、配置、插件推荐、多用户使用教程">Jupyter Lab | 安装、配置、插件推荐、多用户使用教程</a><time datetime="2021-11-25T09:38:43.000Z" title="发表于 2021-11-25 17:38:43">2021-11-25</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div id="footer_deal"><a class="social-icon" href="mailto:865717150@qq.com" target="_blank" title="Email" rel="external nofollow noopener noreferrer"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://blog.csdn.net/qq_43701912" target="_blank" title="CSDN" rel="external nofollow noopener noreferrer"><i class="iconfont icon-csdn1"></i></a><a class="social-icon" href="https://github.com/Justlovesmile" target="_blank" title="Github" rel="external nofollow noopener noreferrer"><i class="fab fa-github"></i></a><a class="social-icon" href="https://weibo.com/u/5252319712" target="_blank" title="微博" rel="external nofollow noopener noreferrer"><i class="fa fa-weibo"></i></a><a class="social-icon" href="https://space.bilibili.com/168738824" target="_blank" title="Bilibili" rel="external nofollow noopener noreferrer"><i class="fas iconfont icon-bilibili"></i></a></div><div id="mj-footer"><div class="footer-group"><h3 class="footer-title">关于</h3><div class="footer-links"><a class="footer-item" target="_blank" rel="external nofollow noopener noreferrer" href="https://www.justlovesmile.top/">个人主页</a><a class="footer-item" href="/donate/">赞赏博主</a><a class="footer-item" href="/update/">博客日志</a><a class="footer-item" href="/charts/">博客统计</a></div></div><div class="footer-group"><h3 class="footer-title">归档</h3><div class="footer-links"><a class="footer-item" href="/archives/">文章归档</a><a class="footer-item" href="/tags/">全部标签</a><a class="footer-item" href="/categories/">全部分类</a><a class="footer-item" href="/random/">随机文章</a></div></div><div class="footer-group"><h3 class="footer-title">导航</h3><div class="footer-links"><a class="footer-item" href="/guestbook/">博客留言</a><a class="footer-item" href="/friends/">友情链接</a><a class="footer-item" href="/fcircle/">友链订阅</a><a class="footer-item" href="/atom.xml">RSS订阅</a></div></div><div class="footer-group"><h3 class="footer-title">协议</h3><div class="footer-links"><a class="footer-item" href="/privacy/">隐私协议</a><a class="footer-item" href="/cookies/">Cookies</a><a class="footer-item" href="/cc/">版权协议</a></div></div></div><div id="footer-banner"><div class="footer-banner-links"><div class="footer-banner-left"><div id="footer-banner-tips">©2019 - 2022 By Justlovesmile</div></div><div class="footer-banner-right"><a class="footer-banner-link" target="_blank" rel="external nofollow noopener noreferrer" href="http://beian.miit.gov.cn/">蜀ICP备20004960号</a><a class="footer-banner-link" href="/update/">主题</a><a class="footer-banner-link" href="/about/">关于</a></div></div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">本地搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"></div></div><hr><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script defer src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script defer src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script defer src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script defer src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script defer src="/js/search/local-search.js"></script><div class="js-pjax"><script>(()=>{
  const init = () => {
    twikoo.init(Object.assign({
      el: '#twikoo-wrap',
      envId: 'blog-comment-3gt33nkmf9f97e6e',
      region: 'ap-shanghai',
      onCommentLoaded: function () {
        btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.vemoji)'))
      }
    }, null))
  }

  const getCount = () => {
    twikoo.getCommentsCount({
      envId: 'blog-comment-3gt33nkmf9f97e6e',
      region: 'ap-shanghai',
      urls: [window.location.pathname],
      includeReply: false
    }).then(function (res) {
      document.getElementById('twikoo-count').innerText = res[0].count
    }).catch(function (err) {
      console.error(err);
    });
  }

  const runFn = () => {
    init()
    
  }

  const loadTwikoo = () => {
    if (typeof twikoo === 'object') {
      setTimeout(runFn,0)
      return
    } 
    getScript('https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js').then(runFn)
  }

  if ('Twikoo' === 'Twikoo' || !true) {
    if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
    else loadTwikoo()
  } else {
    window.loadOtherComment = () => {
      loadTwikoo()
    }
  }
})()</script></div><canvas id="universe"></canvas><script defer>console.log("\n %c 欢迎来到Justlovesmile の Blog %c https://github.com/Justlovesmile %c https://blog.justlovesmile.top \n","color: #f9ed69; background: #252a34; padding:5px 0;","background: #3fc1c9; padding:5px 0;","background: #3fc1c9; padding:5px 0;");</script><script defer src="/js/rgbaster.min.js"></script><script defer src="/js/justlovesmile.js"></script><script>window.addEventListener('load', async () => {navigator.serviceWorker.register(`/js/sw-cdn.js?time=${new Date().getTime()}`).then(async reg => {if (window.localStorage.getItem('install') != 'true') {window.localStorage.setItem('install', 'true');setTimeout(() => {window.location.search = `?time=${new Date().getTime()}`}, 1000)}}).catch(err => {console.log('sw-cdn.js error')})});</script></div></body></html>